#!/usr/bin/python
# -*- coding: UTF-8 -*-


import os

#set of structure files needed
from seznam import codes as list

#non-remediated files
uri = "ftp://snapshots.wwpdb.org/20070731/pub/pdb/data/structures/all/mmCIF/%s.cif.Z"

optionfile = open("addresses", "w")
try:
    print "Preparing address list"
    for file in list:
        optionfile.write((uri % file.lower()) + "\n")
finally:
    optionfile.close()

print "wget -i addresses"
print "Process ended with state", os.system("wget -i addresses")

os.unlink("addresses")



